This method calculates the Absolute Price Oscillator.
var APO(fastPeriod, slowPeriod, maType, dataArray, calculatedDataArray);
fastPeriod
Period integer value.
slowPeriod
Array object filled with high prices.
maType
Array object filled with low prices.
dataArray
Array object filled with close prices.
calculatedDataArray
Empty Array object that will be filled with calculated data.
Returns true if calculation was completed successfully, or false otherwise.
The following example demonstrates how to use APO method.
function calculate(beginIndex, endIndex)
{
var fastPeriod = 15;
var slowPeriod = 10;
var maType = TechnicalAnalysis.MA_MAMA;
var dataArray = new Array();
//populate data array..
..
var calculatedDataArray = new Array();
var rc = TechnicalAnalysis.APO(fastPeriod, slowPeriod, maType, dataArray, calculatedDataArray);
}
Copyright © 2006-2009 ActiveTick LLC